﻿using NLog;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;

namespace Model
{
    /// <summary>
    /// 日志打印
    /// </summary>
    public class Log
    {
        private static Logger log = LogManager.GetLogger("Logger");

        public static void Info(string message)
        {
           log.Info($"\t{message}");
        }

        public static void Info(int message)
        {
           log.Info(message);
        }

        public static void Debug(string message)
        {
            log.Debug(message);
        }

        public static void Error(string message)
        {
            log.Error(message);
        }

        public static MethodBase GetStackMethod(int depth = 2)
        {
            StackTrace stackTrace = new StackTrace(true);
            return stackTrace.GetFrame(depth).GetMethod();
        }

    }
}
